package com.baiwei.vpnapi.dao;

import com.baiwei.vpnapi.entity.VpnPaymethod;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @program: vpnapi
 * @description: 支付方式dao
 * @author: Mr. Stone
 * @create: 2020-03-11 00:12
 **/
@Mapper
public interface PaymethodMapper extends BaseMapper<VpnPaymethod> {
    @Select("<script>"+
            "select * from paymethod " +
            "<where>" +
            "and status = 1 " +
            "<if test='platform != null '> " +
            "and platform = #{platform}" +
            "and platform != ''" +
            "</if>"+
            "</where>"+
            "</script>")
    List<VpnPaymethod> getAvailablePaymethod(String platform);
}
